package com.wu.client.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Cousin
 * @date 2025/4/1
 * @Description
 */
@AllArgsConstructor
@Getter
public enum AlbumTypeEnum {
    SOLO_ALBUM("个人专辑", 1),
    LIVE_ALBUM("现场专辑", 2),
    COMPILATION("合辑", 3),
    REMIX_ALBUM("混音专辑", 4),
    EP("迷你专辑", 5),
    SINGLES("单曲", 6),
    COLLABORATION("合作专辑", 7),
    SOUNDTRACK("原声带", 8),
    GREATEST_HITS("精选集", 9),
    DEMO("Demo专辑", 10),
    CONCEPT_ALBUM("概念专辑", 11),
    TRIBUTE_ALBUM("致敬专辑", 12);

    private final String type;
    private final Integer code;

    public static String getTypeByCode(Integer code) {
        for (AlbumTypeEnum albumTypeEnum : AlbumTypeEnum.values()) {
            if (albumTypeEnum.getCode().equals(code)) {
                return albumTypeEnum.getType();
            }
        }
        // 返回默认值
        return "未知专辑类型";
    }
}
